//
//  LookImgViewController.m
//  项目三
//
//  Created by rimi1 on 2016/12/11.
//  Copyright © 2016年 Wangxingqian. All rights reserved.
//

#import "LookImgViewController.h"

@interface LookImgViewController ()

@property (nonatomic, strong) UIImageView *imageView;

@end

@implementation LookImgViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initializeDataSource];
    [self initializeAppearance];
}

#pragma mark - initialize

- (void)initializeDataSource {
    
}

- (void)initializeAppearance {
    [self.navigationBar.right setImage:[UIImage imageNamed:@"垃圾桶"] forState:UIControlStateNormal];
    [self.view addSubview:self.imageView];
}

#pragma mark - respondsTo...

- (void)respondsToRight:(UIButton *)sender {
    if (self.block) {
        self.block();
        [self.navigationController popViewControllerAnimated:YES];
    }
}

#pragma mark - get

- (UIImageView *)imageView {
    
    if (!_imageView) {
        
        _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 64, kWIDTH, kHEIGHT - 64)];
        // 以最长边，按比例缩小
        _imageView.contentMode = UIViewContentModeScaleAspectFit;
        _imageView.image = self.img;
        
    }
    return _imageView;
}

@end













